import request from '@/utils/request'

// 查询app功能列表
export function listFunction(query) {
  return request({
    url: '/app/function/list',
    method: 'get',
    params: query
  })
}
// 根据页面查询app功能列表
export function getFunctionList(query) {
  return request({
    url: '/app/function/getFunctionList',
    method: 'post',
    data: query
  })
}
// 查询app功能详细
export function getFunction(functionId) {
  return request({
    url: '/app/function/' + functionId,
    method: 'get'
  })
}

// 新增app功能
export function addFunction(data) {
  return request({
    url: '/app/function',
    method: 'post',
    data: data
  })
}

// 修改app功能
export function updateFunction(data) {
  return request({
    url: '/app/function',
    method: 'put',
    data: data
  })
}

// 删除app功能
export function delFunction(functionId) {
  return request({
    url: '/app/function/' + functionId,
    method: 'delete'
  })
}
